<!-- 鉴权,已添加全局,行内元素 -->
<template>
  <div v-if="show" class="power" :class="props.class" :style="props.style">
    <slot></slot>
  </div>
</template>

<script setup>
import router from "@/router";
import { ref } from "vue";
const props = defineProps({
  power: String,
  class: '',
  style: Object
})
let limit = [...router.currentRoute._value.meta.limit];
const show = ref(limit.indexOf(props.power) !== -1)

console.log(999, router.currentRoute._value);
</script>

<style lang="less" scoped>
@import "./index.less";
</style>